<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="UTF-8">
	<link rel="stylesheet" href="css/style.css">
	<script src="js/jquery-1.8.0.js"></script>
	<script src="js/city.min.js"></script>
	<script type="text/javascript"  src="js/jquery.raty.min.js"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
    <script class="resources library" src="js/area.js" type="text/javascript"></script>
	<title>商城下单界面</title>
</head>
<body>
	<div class="wrap">
        <div class="main" id="home">
        	<!-- 新闻中心页头 -->
        	<div id="header">
        		<div class="header_top">
        			<div class="common_width clearfix">
        				<p class="header_title">您好，欢迎您来到安徽智慧乐生活家政管理有限公司！ 您身边的家政服务专家！</p>
        				<div class="loginbar"><a href="#">登录</a>  |  <a href="#">注册</a>  |  我的预约</div>
        			</div>
        		</div>
        		<div class="nav common_width clearfix">
        			<img src="imgs/logo.gif" alt="智慧乐" class="logo_img">
        			<div class="nav_title">
        				<ul class="clearfix">
	        				<li><a href="">首页</a></li>
	        				<li><a href="">新闻中心</a></li>
	        				<li><a href="">服务项目</a></li>
	        				<li><a href="">积分商城</a></li>
	        				<li><a href="">培训学院</a></li>
	        				<li><a href="">招商加盟</a></li>
	        				<li><a href="">联系我们</a></li>
        				</ul>
        			</div>
        			<div class="pre_order">
        				<a href="">立即下单</a><a href="">快速预约</a>
        			</div>
        		</div>
        	</div>
        	<div class="hr_10"></div>
			<div class="common_width common_item">
				<a href="">首页</a> <em>></em> 会员中心
			</div>
			<div class="common_width">
				<h3 class="shop_list">商品列表</h3>
				<div class="mall clearfix">
					<label for="">收货地址：</label>
					<div class="mall_text">
						<div class="mall_text_p mall_text_chosen clearfix"><p>简单点儿 13855826546 安徽  合肥 蜀山区 幸福里小区</p><a href="">修改地址</a></div>
						<div class="mall_text_p clearfix"><p>简单点儿 13855826546 安徽  合肥 蜀山区 幸福里小区</p><a href="">修改地址</a></div>
						<a href="" class="mall_manage">管理我的收货地址</a>
					</div>
				</div>
				<h3 class="shop_list customer_list">订单信息</h3>
				<div class="goods">
					<table class="goods_table">
						<tr>
							<th width="480">商品信息</th>
							<th width="120">单价</th>
							<th width="120">数量</th>
							<th width="110">金额</th>
							<th width="170">配送方式</th>
						</tr>
						<tr class="goods_tr">
							<td valign="top clearfix">
								<div class="goods_img fl">
									<img src="imgs/1.jpg" alt="">
								</div>
								<div class="goods_text fl clearfix">
									<h3 class="goods_title fl"><a href="">茶花收纳箱塑料大号小玩具衣服衣物储物箱箱子透明百纳箱整理箱</a></h3>
									<div class="goods_p fl">
										<p>颜色：白色</p>
										<p>尺寸：L</p>
									</div>
								</div>
							</td>
							<td valign="top">￥<span class="buy_price">49.00</span></td>
							<td valign="top">
								<div class="goods_cart">
									<input class="min" name="" type="button" value="-" />
									<input class="text_box" name="" type="text" value="1" />
									<input class="add" name="" type="button" value="+" />
								</div>
							</td>
							<td valign="top"><em class="yen">￥</em><span class="total"></span></td>
							<td valign="top">
								<div class="distribution clearfix">
									<label for="">普通配送</label>
									<input type="text" value="快递 免邮" readonly="readonly" class="distribution_input">
									<ul class="select_menu" style="display:none">
										<li>5元</li>
										<li>10元</li>
									</ul>
								</div>
								<p class="distribution_date">16:00前付款，预计<span>8月7日(周日)</span>送达</p>
							</td>
						</tr>
						<tr class="goods_tr">
							<td valign="top clearfix">
								<div class="goods_img fl">
									<img src="imgs/1.jpg" alt="">
								</div>
								<div class="goods_text fl clearfix">
									<h3 class="goods_title fl"><a href="">茶花收纳箱塑料大号小玩具衣服衣物储物箱箱子透明百纳箱整理箱</a></h3>
									<div class="goods_p fl">
										<p>颜色：白色</p>
										<p>尺寸：L</p>
									</div>
								</div>
							</td>
							<td valign="top">￥<span class="buy_price">49.00</span></td>
							<td valign="top">
								<div class="goods_cart">
									<input class="min" name="" type="button" value="-" />
									<input class="text_box" name="" type="text" value="1" />
									<input class="add" name="" type="button" value="+" />
								</div>
							</td>
							<td valign="top"><em class="yen">￥</em><span class="total"></span></td>
							<td valign="top">
								<div class="distribution clearfix">
									<label for="">普通配送</label>
									<input type="text" value="快递 免邮" readonly="readonly" class="distribution_input">
									<ul class="select_menu" style="display:none">
										<li>5元</li>
										<li>10元</li>
									</ul>
								</div>
								<p class="distribution_date">16:00前付款，预计<span>8月7日(周日)</span>送达</p>
							</td>
						</tr>
					</table>
					<p class="order_total">合计(含运费)<span>￥98.00</span></p>
				</div>
				<div class="total_money">
					<p class="total_money_num">实付款：<em class="total_money_em">￥</em><span  class="all_total"></span></p>
					<p class="order_number">可获得积分：54</p>
				</div>
				<div class="service_info">
					<h3 class="details_list">付款类型</h3>
					<div class="payment">
						<h4 class="online">在线支付</h4>
						<ul class="payment_type clearfix">
							<li class="payment_li payment_li_bg">支付宝支付</li>
							<li class="payment_li">微信支付</li>
						</ul>
						<p class="payment_text">亲爱的用户，您需要使用<span>￥119元 </span>支付次订单。</p>
					</div>
				</div>
				<div class="mall_explain clearfix">
					<button>提交订单</button>
				</div>
			</div>
        </div>
        <div class="hr_76"></div>
    </div>
    <div id="footer">
    	<div class="common_width footer">
    		<div class="hr_23"></div>
    		<form action="" class="footer_nav">
    			<table border="0">
					<tr>
						<th>家庭服务</th>
						<th>家政师</th>
						<th>培训学院</th>
						<th>个人中心</th>
						<th>加入我们</th>
					</tr>
					<tr>
						<td><a href="">家庭保洁</a></td>
						<td><a href="">月嫂</a></td>
						<td><a href="">学院简介</a></td>
						<td><a href="">我的订单</a></td>
						<td><a href="">招商加盟</a></td>
					</tr>
					<tr>
						<td><a href="">家居保养</a></td>
						<td><a href="">育婴师</a></td>
						<td><a href="">培训课程</a></td>
						<td><a href="">我的积分</a></td>
						<td><a href="">培训课程</a></td>
					</tr>
					<tr>
						<td><a href="">家电清洗</a></td>
						<td><a href="">催乳师</a></td>
						<td><a href="">学院相册</a></td>
						<td><a href="">家政预约</a></td>
						<td><a href="">服务方式</a></td>
					</tr>
					<tr>
						<td><a href="">家居洗涤</a></td>
						<td><a href="">早教师</a></td>
						<td><a href="">学院相册</a></td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><a href="">养老陪护</a></td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><a href="">居家保姆</a></td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
					</tr>
				</table>
    		</form>
    		<div class="qr_code">
    			<img src="imgs/qr_code.gif" alt="">
    			<p>扫一扫</p>
    		</div>
    	</div>
    </div>

<script>
	$(function(){
		// 快递运费选择
		$('.distribution_input').click(function() {
			$(this).next('.select_menu').slideToggle(200);
		});
		$(document).bind('click', function(e){
			var target = $(e.target);
			if(target.closest('.distribution_input').length == 0){
				$('.select_menu').slideUp(200);
			}
		});
		$('.select_menu li').click(function() {
			var Text = $(this).text();
			$(this).parent().siblings('.distribution_input').val(Text);
		});

		//数量增加操作
		$(".add").click(function(){
			var t = $(this).siblings('.text_box');
			t.val(parseInt(t.val())+1);
			setTotal();
			setTotalMoney();
		})
//		//数量减少操作
		$(".min").click(function(){
			var t = $(this).siblings('.text_box');
			if (parseInt(t.val())>0){
				t.val(parseInt(t.val())-1);
			}
			setTotal();
			setTotalMoney();
        });
		//计算操作
		function setTotal() {
			$('.goods_table .buy_price').each(function(i){
				var price = parseInt( $('.goods_table .buy_price').eq(i).text() );
				var num = parseInt( $('.goods_table .text_box').eq(i).val() );
				$(".total").eq(i).html( price * num );
			});
		};
		setTotal();

		function setTotalMoney() {
            var money =  $('.goods_table .total');
            var totalmoney = 0;
            for(var n = 0; n < money.length; n++){
                totalmoney += parseInt(money.eq(n).text());
            }
            $('.all_total').text(totalmoney);
        }
        setTotalMoney();

		// 地址选择
		$('.mall_text_p').click(function() {
			$(this).addClass('mall_text_chosen').siblings('.mall_text_p').removeClass('mall_text_chosen');
		})
		// 支付方式
		$('.payment_type li').click(function() {
			$(this).addClass('payment_li_bg').removeClass('payment_li');
			$(this).siblings('.payment_type li').removeClass('payment_li_bg').addClass('payment_li');
		})
		// $('.subNav').click(function() {
		// 	$(this).toggleClass('sub_active');
		// 	$(this).children('span').toggleClass('nav-title');
		// 	$(this).siblings('.subNav').children('span').removeClass('nav-title');

		// 	$(this).children('span').toggleClass('nav_active');
		// 	$(this).siblings('.subNav').children('span').removeClass('nav_active');

		// 	$(this).siblings('.subNav').removeClass('sub_active');
		// 	$(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500);
		// });

		// $('.navContent li').click(function() {
		// 	$(this).addClass('sub_active').children('a').addClass('nav_shop_active').removeClass('nav_shop');
		// 	$(this).siblings('li').removeClass('sub_active').children('a').removeClass('nav_shop_active').addClass('nav_shop');
		// });

	})
</script>
</body>
</html>